Skip to content

PR: Fix ExceptDialog hardcoded dependency and add cross-platform log file support - #48

Merged
jnsebgosselin merged 5 commits into
mainfrom
fix_exceptions
Aug 20, 2026
Merged

PR: Fix ExceptDialog hardcoded dependency and add cross-platform log file support#48
jnsebgosselin merged 5 commits into
mainfrom
fix_exceptions

Conversation

@jnsebgosselin

@jnsebgosselin jnsebgosselin commented Aug 20, 2026

Copy link
Copy Markdown
Member

Fixes two bugs and improves cross-platform compatibility across two files.

qtapputils/widgets/exceptions.pyExceptDialog:

  • Removes a hardcoded import of hydrogeolab.config.main.TEMP_DIR, replacing it with an optional temp_dir constructor parameter that validates the path and falls back to the system temp directory.
  • Replaces os.startfile() (Windows-only) with QDesktopServices.openUrl() for cross-platform log file opening.
  • Adds encoding='utf-8' when writing the log file.

qtapputils/managers/capture.pyStandardStreamEmitter:

  • Adds a stream constructor parameter ('stdout' or 'stderr') so each emitter instance targets the correct underlying system stream.
  • Updates write() to delegate to the configured stream instead of always writing to sys.__stdout__.
  • Adds a flush() method that flushes the correct underlying stream, preventing AttributeError on sys.stdout.flush() or sys.stderr.flush() while capturing.

@jnsebgosselin jnsebgosselin self-assigned this Aug 20, 2026
@jnsebgosselin jnsebgosselin added the bug Something isn't working label Aug 20, 2026
@jnsebgosselin jnsebgosselin changed the title PR: Fix ExceptDialog and StandardStreamEmitter PR: Fix ExceptDialog hardcoded dependency and add cross-platform log file support Aug 20, 2026
@jnsebgosselin
jnsebgosselin merged commit b59f96a into main Aug 20, 2026
1 check passed
@jnsebgosselin jnsebgosselin modified the milestones: 0.10.0, 0.10.1 Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant